<!-- 顶部导航 -->
<div class="navbar navbar-fixed-top my-nav" role="navigation">
    <div class="container nav-container">
        <div class="navbar-header">
            <button #button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse" (click)="toggle(button)">
                <span class="sr-only">Toggle Navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a routerLink="/article" class="navbar-brand navbar-brand-my" (click)="closeTog()">
                错对对
            </a>
        </div>
        <div class="navbar-collapse navbar-responsive-collapse" [class.collapse]="isShort" aria-expanded="false" ngStyle="" (click)="closeTog()">
            <ul class="nav navbar-nav">
                <li routerLinkActive="active" class="dropdown">
                    <a routerLink="/article">文章</a>
                </li>
                <li routerLinkActive="active" class="dropdown">
                    <a routerLink="/question">问题</a>
                </li>
                <li class="dropdown">
                    <a href="https://git.oschina.net/cuoduidui/show-live.git" data-toggle="dropdown" class="dropdown-toggle" target="_blank">源码下载</a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right" *ngIf="!isUser">
                <li routerLinkActive="active">
                    <a routerLink="/user/login">登录</a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="/user/regist">注册</a>
                </li>
            </ul>
            <ul *ngIf="isUser" class="nav navbar-nav navbar-right">
                <li routerLinkActive="active">
                    <a>欢迎{{user.name}}</a>
                </li>
                <li routerLinkActive="active" ng-if="isAdmin">
                    <a routerLink="/article/write">发布文章</a>
                </li>
                <li routerLinkActive="active">
                    <a routerLink="/user/detail">网站统计</a>
                </li>
                <li>
                    <a (click)="logout()">登出</a>
                </li>

            </ul>
        </div>
    </div>
</div>
<ShowModel (chooseEt)="closeMadel($event)"></ShowModel>
<!-- 主体内容区域 -->
<div class="container main-container" (click)="closeTog()">
    <router-outlet></router-outlet>
</div>